//
//  HYAboutViewController.m
//  HYChatProject
//
//  Created by erpapa on 16/5/15.
//  Copyright © 2016年 erpapa. All rights reserved.
//

#import "HYAboutViewController.h"
#import "YYText.h"
#import <MessageUI/MessageUI.h>

@interface HYAboutViewController ()<MFMailComposeViewControllerDelegate>

@end

@implementation HYAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIImageView * logoView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_logo"]];
    logoView.frame = CGRectMake((kScreenW-66)/2.0, 110, 66, 66);
    [self.view addSubview:logoView];
    
    UILabel * nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 200, kScreenW-40, 25)];
    nameLabel.text = [NSString stringWithFormat:@"科奇通讯  %@",[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]];
    nameLabel.textAlignment = NSTextAlignmentCenter;
    nameLabel.textColor = APP_MAIN_COLOR;
    nameLabel.font = [UIFont boldSystemFontOfSize:17];
    [self.view addSubview:nameLabel];
    
    
//    UILabel * versionLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 230, kScreenW-40, 25)];
//    versionLabel.text = [NSString stringWithFormat:@"V%@",[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]];
//    versionLabel.textAlignment = NSTextAlignmentCenter;
//    versionLabel.textColor = COLOR(150.f, 150.f, 150.f,1);
//    versionLabel.font = [UIFont systemFontOfSize:17];
//    [self.view addSubview:versionLabel];
    

    UILabel * cLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, kScreenH-50, kScreenW-40, 25)];
    cLabel.text = @"Copyright © 2018年 Jagtu. All rights reserved.";
    cLabel.textAlignment = NSTextAlignmentCenter;
    cLabel.textColor = COLOR(150.f, 150.f, 150.f,1);
    cLabel.font = [UIFont systemFontOfSize:10];
    [self.view addSubview:cLabel];
}

- (NSAttributedString *)padding {
    NSMutableAttributedString *pad = [[NSMutableAttributedString alloc] initWithString:@"\n\n"];
    pad.yy_font = [UIFont systemFontOfSize:18];
    return pad;
}

#pragma mark - MFMailComposeViewControllerDelegate
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
{
    [controller dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
